/* 
 * Bitmain Tech, Home of Professional Bitmain Tech
 * Copyright 2014 Bitmain Tech Inc. and/or its affiliates and other contributors
 * as indicated by the @author tags. All rights reserved.
 * See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 */
package com.bitmain.mmst.domain;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.List;

import com.bitmain.mmst.core.base.BasicDomain;

/**
 * 领域模型：矿场算力概况
 *
 * @author Kweny - enkun.jiang@bitmain.com
 * @since 2016年2月16日
 *
 */
public class MineHashrateOverview extends BasicDomain {
	private static final long serialVersionUID = 3418922242227882453L;
	/**
	 * 矿场矿机总数
	 */
	private int numAll;
	/**
	 * 执行检测的矿机数
	 */
	private int numDetect;
	/**
	 * 检测到的矿机数
	 */
	private int numDetail;
	/**
	 * 未检测到的矿机数
	 */
	private int numFailure;
	/**
	 * 算力合格的矿机数
	 */
	private int numPassed;
	/**
	 * 算力不达标的矿机数
	 */
	private int numUnpassed;
	/**
	 * 算力合格率
	 */
	private double ratePassed;
	private String ratePassedD;
	/**
	 * 矿场理论总算力(G)
	 */
	private double overallTheory;
	private String overallTheoryD;
	/**
	 * 矿场实际总算力(G)
	 */
	private double overallReal;
	private String overallRealD;
	/**
	 * 对应时间的各机架算力概况
	 */
	private List<ShelfHashrateOverview> shelfOverviews;
	/**
	 * 检测时间
	 */
	private long detectTime;
	/**
	 * 显示用检测时间
	 */
	private String detectTimeDisplay;
	/**
	 * 显示用时区
	 */
	private String timeZoneDisplay;

	/**
	 * @return the numAll
	 */
	public int getNumAll() {
		return numAll;
	}

	/**
	 * @param numAll
	 *            the numAll to set
	 */
	public void setNumAll(int numAll) {
		this.numAll = numAll;
	}

	/**
	 * @return the numDetect
	 */
	public int getNumDetect() {
		return numDetect;
	}

	/**
	 * @param numDetect the numDetect to set
	 */
	public void setNumDetect(int numDetect) {
		this.numDetect = numDetect;
	}

	/**
	 * @return the numDetail
	 */
	public int getNumDetail() {
		return numDetail;
	}

	/**
	 * @param numDetail
	 *            the numDetail to set
	 */
	public void setNumDetail(int numDetail) {
		this.numDetail = numDetail;
	}

	/**
	 * @return the numFailure
	 */
	public int getNumFailure() {
		return numFailure;
	}

	/**
	 * @param numFailure
	 *            the numFailure to set
	 */
	public void setNumFailure(int numFailure) {
		this.numFailure = numFailure;
	}

	/**
	 * @return the numPassed
	 */
	public int getNumPassed() {
		return numPassed;
	}

	/**
	 * @param numPassed
	 *            the numPassed to set
	 */
	public void setNumPassed(int numPassed) {
		this.numPassed = numPassed;
	}

	/**
	 * @return the numUnpassed
	 */
	public int getNumUnpassed() {
		return numUnpassed;
	}

	/**
	 * @param numUnpassed
	 *            the numUnpassed to set
	 */
	public void setNumUnpassed(int numUnpassed) {
		this.numUnpassed = numUnpassed;
	}

	/**
	 * @return the ratePassed
	 */
	public double getRatePassed() {
		return ratePassed;
	}

	/**
	 * @param ratePassed
	 *            the ratePassed to set
	 */
	public void setRatePassed(double ratePassed) {
		this.ratePassed = ratePassed;
		this.ratePassedD = String.valueOf(new BigDecimal(String.valueOf(ratePassed)).multiply(new BigDecimal("100")).doubleValue());
	}
	
	/**
	 * @return the overallTheory
	 */
	public double getOverallTheory() {
		return overallTheory;
	}

	/**
	 * @param overallTheory
	 *            the overallTheory to set
	 */
	public void setOverallTheory(double overallTheory) {
		this.overallTheory = overallTheory;
		DecimalFormat df = new DecimalFormat("#,##0.00");
		this.overallTheoryD = df.format(overallTheory);
	}

	/**
	 * @return the overallReal
	 */
	public double getOverallReal() {
		return overallReal;
	}
	
	/**
	 * @param overallReal
	 *            the overallReal to set
	 */
	public void setOverallReal(double overallReal) {
		this.overallReal = overallReal;
		DecimalFormat df = new DecimalFormat("#,##0.00");
		this.overallRealD = df.format(overallReal);
	}

	/**
	 * @return the shelfOverviews
	 */
	public List<ShelfHashrateOverview> getShelfOverviews() {
		return shelfOverviews;
	}

	/**
	 * @param shelfOverviews the shelfOverviews to set
	 */
	public void setShelfOverviews(List<ShelfHashrateOverview> shelfOverviews) {
		this.shelfOverviews = shelfOverviews;
	}

	/**
	 * @return the detectTime
	 */
	public long getDetectTime() {
		return detectTime;
	}

	/**
	 * @param detectTime
	 *            the detectTime to set
	 */
	public void setDetectTime(long detectTime) {
		this.detectTime = detectTime;
	}

	/**
	 * @return the detectTimeDisplay
	 */
	public String getDetectTimeDisplay() {
		return detectTimeDisplay;
	}

	/**
	 * @param detectTimeDisplay
	 *            the detectTimeDisplay to set
	 */
	public void setDetectTimeDisplay(String detectTimeDisplay) {
		this.detectTimeDisplay = detectTimeDisplay;
	}

	/**
	 * @return the timeZoneDisplay
	 */
	public String getTimeZoneDisplay() {
		return timeZoneDisplay;
	}

	/**
	 * @param timeZoneDisplay
	 *            the timeZoneDisplay to set
	 */
	public void setTimeZoneDisplay(String timeZoneDisplay) {
		this.timeZoneDisplay = timeZoneDisplay;
	}

	/**
	 * @return the ratePassedD
	 */
	public String getRatePassedD() {
		return ratePassedD;
	}

	/**
	 * @param ratePassedD the ratePassedD to set
	 */
	public void setRatePassedD(String ratePassedD) {
		this.ratePassedD = ratePassedD;
	}

	/**
	 * @return the overallTheoryD
	 */
	public String getOverallTheoryD() {
		return overallTheoryD;
	}

	/**
	 * @param overallTheoryD the overallTheoryD to set
	 */
	public void setOverallTheoryD(String overallTheoryD) {
		this.overallTheoryD = overallTheoryD;
	}

	/**
	 * @return the overallRealD
	 */
	public String getOverallRealD() {
		return overallRealD;
	}

	/**
	 * @param overallRealD the overallRealD to set
	 */
	public void setOverallRealD(String overallRealD) {
		this.overallRealD = overallRealD;
	}

}
